package com.example.warehouse.sys.pojo.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("sys_dept")
public class SysDept implements Serializable {
    /**
     * 数据ID
     */
    @ExcelProperty(value = "ID",index = 0)
    @TableId(type = IdType.AUTO)
    private int id;

    /**
     * 父级部门ID
     */
    @ExcelProperty(value = "父级部门ID",index = 1)
    private int pid;

    /**
     * 部门名
     */
    @ExcelProperty(value = "部门名",index = 2)
    private String name;

    /**
     * 是否展开
     */
    @ExcelProperty(value = "是否展开",index = 3)
    private int open;
    /**
     * 树深度
     */
    @ExcelProperty(value = "树深度",index = 4)
    private int depth;

    /**
     * 简介
     */
    @ExcelProperty(value = "简介",index = 5)
    private String description;

    /**
     * 状态【0不可用1可用】
     */
    @ExcelProperty(value = "状态",index = 6)
    private Integer enable;

    /**
     * 排序序号
     */
    @ExcelProperty(value = "排序序号",index = 7)
    private int sort;
    /**
     * 是否为父级（是否包含子级），1=是父级，0=不是父级
     */
    @ExcelProperty(value = "是否为父级",index = 8)
    private int isParent;

    /**
     * 数据创建时间
     */
    @ExcelProperty(value = "数据创建时间",index = 9)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    /**
     * 数据最后修改时间
     */
    @ExcelProperty(value = "数据最后修改时间",index = 10)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;
}
